project(app LANGUAGES C)

file(GLOB FILE_LIST "*.h" "*.c" "*.S")
add_library(${PROJECT_NAME} ${FILE_LIST})

add_custom_command(TARGET ${PROJECT_NAME} 
    POST_BUILD 
    COMMAND ${OBJDUMP} -x -d -S -m i386 ${PROJECT_BINARY_DIR}/lib${PROJECT_NAME}.a > ${CMAKE_SOURCE_DIR}/obj/${PROJECT_NAME}_dis.txt
    COMMAND ${READELF} -a ${PROJECT_BINARY_DIR}/lib${PROJECT_NAME}.a > ${CMAKE_SOURCE_DIR}/obj/${PROJECT_NAME}_elf.txt
    )